- /* rdxconv.cpp by K.Tsuru */
- // since ver 2.18
- /*****************************************
- SNumber sub-function
- It converts "long x" to "f[]" in radix R.
- and returns "n".
- x = f[n-1]*R^(n-1) + ... +f[1]*R + f[0]
- *****************************************/
- int rdxconv(int *f, long x, long R) {
- int i = 0;
-
- while(x) {
- f[i++] = x % R; x /= R;
- }
- return i;
- }
rdxconv.cpp : last modifiled at 2008/04/24 10:36:30(377 bytes)
created at 2016/04/11 11:17:20
The creation time of this html file is 2017/10/07 10:54:16 (Sat Oct 07 10:54:16 2017).